import React from 'react'
import TodoForm from '../components/TodoForm'
import {useStore} from '../store'

export default function TodoAdd() {
  const store = useStore()

  const addSubmit = (todo) => {
    store.todoStore.addTodo(todo)
  }
  return (
    <div>
      <h3>新增</h3>

      <TodoForm onClick={addSubmit}></TodoForm>
    </div>
  )
}
